//
//  KSAccountSettingTableViewCell.swift
//  Supermarket
//
//  Created by Black_Crystal on 2017/9/21.
//  Copyright © 2017年 kushao. All rights reserved.
//

import UIKit

class KSAccountSettingTableViewCell: UITableViewCell {

    var backImage = UIImageView()
    var headImage = UIImageView()
    var nameLabel = UILabel()
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.contentView.addSubview(backImage)
        backImage.snp.makeConstraints { (make) in
            make.edges.equalTo(UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0))
        }
        
        self.contentView.addSubview(headImage)
        headImage.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.top.equalTo(20)
            make.width.height.equalTo(80)
        }
        
        nameLabel.text = "用户名"
        nameLabel.textColor = UIColor.white
        self.contentView.addSubview(nameLabel)
        nameLabel.snp.makeConstraints { (make) in
            make.bottom.equalTo(self.contentView.snp.bottom).offset(-30)
            make.centerX.equalToSuperview()
        }
    }
    
    func setbackImage(image: String) {
        backImage.image = UIImage.init(named: image)
    }
    
    required init(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
